#include <stdio.h>

void insertion_sort(int arr[], int len)
{
	for(int i = 1; i < len; i++)
	{
		for(int j = i - 1; j >= 0; j--)
		{
			if(arr[j] > arr[j+1])
			{
				int temp = arr[j];
				arr[j] = arr[j+1];
				arr[j+1] = temp;
			}
		}
	}
}

int main()
{
	int a[] = {5,2,4,6,1,3};
	insertion_sort(a, sizeof(a) / 4);
	for(int i = 0; i < 6; i++)
	{
		printf("%d\t", a[i]);
	}

   return 0;
}